package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.InnovationPic;
import com.srzk.youthleagueback.pojo.SocialPracticePic;
import com.srzk.youthleagueback.pojo.ThematicPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface InnovationPicMapper {
    @Insert("insert into innovation_pic (id,picture)" +
            "values (#{innovation_pic.id}, #{innovation_pic.picture})")
    int insert(@Param("innovation_pic") InnovationPic record);

    @Select("SELECT * FROM innovation_pic WHERE id = #{id}")
    List<InnovationPic> selectByPrimaryKeyList(Long id);

    List<InnovationPic> selectAll();

    @Delete("DELETE FROM innovation_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);
}